/*
** basics.c for pushswap in /home/nadali_t//local/Projets/CprgElem/pushswap
** 
** Made by thomas nadalie
** Login   <nadali_t@epitech.net>
** 
** Started on  Wed Jan  4 14:27:56 2012 thomas nadalie
** Last update Thu Jan  5 15:49:23 2012 thomas nadalie
*/

void	my_putchar(char c)
{
  write(1, &c, 1);
}

void	my_putstr(char *str)
{
  int	i;

  i = 0;
  while (str)
    my_putchar(str[i++]);
}

void	my_put_nbr(int nb)
{
  if (nb < 0)
    {
      my_putchar('-');
      nb = nb * -1;
    }
  if (nb > 9)
    my_put_nbr(nb / 10);
  my_putchar((nb % 10) + 48);
}
